<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="box">box</div>

    <script>
      /*
       1. 创建li节点对象
       2. 获取父对象
       3. 子对象可以通过appand...方法插入到父对象
       4. appand...支持的参数类型：元素对象，字符串
       5. appand...支持多参数
      */
      const box = document.getElementById("box");

      const p = document.createElement("p");
      p.innerHTML = "new P";
      const b = document.createElement("b");
      p.innerHTML = "new b";
      const text = document.createTextNode("new text");

      box.append(p, b, text, "hello jack");
    </script>
  </body>
</html>
